package com.lin.fengxiu.service;
import com.lin.fengxiu.model.Theme;
import com.lin.fengxiu.repository.ThemeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

/**
 * @ClassName ThemeService
 * @Description TODO 主题逻辑层
 * @Author wushaopei
 * @Date 2021/3/8 6:43
 * @Version 1.0
 */
@Service
public class ThemeService {

    @Autowired
    private ThemeRepository themeRepository;

    public List<Theme> findByNames(List<String> names) {
        return themeRepository.findByNames(names);
    }

    public Optional<Theme> findByName(String name) {
        return themeRepository.findByName(name);
    }
}
